package main

import (
	"fmt"
	"strings"
)

func wordCount(str string) map[string]int {
	//	panic("not implemented")
	var words []string = strings.Fields(str)
	m := make(map[string]int)
	for _, v := range words {
		m[v]++
	}
	return m
}

func main() {
	str := `Robert Cohn was once middleweight boxing champion of Princeton. Do not think that I am very much impressed by that as a boxing title, but it meant a lot to Cohn. He cared nothing for boxing, in fact he disliked it, but he learned it painfully and thoroughly to counteract the feeling of inferiority and shyness he had felt on being treated as a Jew at Princeton. There was a certain inner comfort in knowing he could knock down anybody who was snooty to him, although, being very shy and a thoroughly nice boy, he never fought except in the gym. He was Spider Kelly's star pupil. Spider Kelly taught all his young gentlemen to box like featherweights, no matter whether they weighed one hundred and five or two hundred and five pounds. But it seemed to fit Cohn. He was really very fast. He was so good that Spider promptly overmatched him and got his nose permanently flattened. This increased Cohn's distaste for boxing, but it gave him a certain satisfaction of some strange sort, and it certainly improved his nose. In his last year at Princeton he read too much and took to wearing spectacles. I never met any one of his class who remembered him. They did not even remember that he was middleweight boxing champion. I mistrust all frank and simple people, especially when their stories hold together, and I always had a suspicion that perhaps Robert Cohn had never been middleweight boxing champion, and that perhaps a horse had stepped on his face, or that maybe his mother had been frightened or seen something, or that he had, maybe, bumped into something as a young child, but I finally had somebody verify the story from Spider Kelly. Spider Kelly not only remembered Cohn. He had often wondered what had become of him. Robert Cohn was a member, through his father, of one of the richest Jewish families in New York, and through his mother of one of the oldest. At the military school where he prepped for Princeton, and played a very good end on the football team, no one had made him race-conscious. No one had ever made him feel he was a Jew, and hence any different from anybody else, until he went to Princeton. He was a nice boy, a friendly boy, and very shy, and it made him bitter. He took it out in boxing, and he came out of Princeton with painful self-consciousness and the flattened nose, and was married by the first girl who was nice to him. He was married five years, had three children, lost most of the fifty thousand dollars his father left him, the balance of the estate having gone to his mother, hardened into a rather unattractive mould under domestic unhappiness with a rich wife; and just when he had made up his mind to leave his wife she left him and went off with a miniature-painter. As he had been thinking for months about leaving his wife and had not done it because it would be too cruel to deprive her of himself, her departure was a very healthful shock. The divorce was arranged and Robert Cohn went out to the Coast. In California he fell among literary people and, as he still had a little of the fifty thousand left, in a short time he was backing a review of the Arts. The review commenced publication in Carmel, California, and finished in Provincetown, Massachusetts. By that time Cohn, who had been regarded purely as an angel, and whose name had appeared on the editorial page merely as a member of the advisory board, had become the sole editor. It was his money and he discovered he liked the authority of editing. He was sorry when the magazine became too expensive and he had to give it up. By that time, though, he had other things to worry about. He had been taken in hand by a lady who hoped to rise with the magazine. She was very forceful, and Cohn never had a chance of not being taken in hand. Also he was sure that he loved her. When this lady saw that the magazine was not going to rise, she became a little disgusted with Cohn and decided that she might as well get what there was to get while there was still something available, so http://www.en8848.com.cn she urged that they go to Europe, where Cohn could write. They came to Europe, where the lady had been educated, and stayed three years. During these three years, the first spent in travel, the last two in Paris, Robert Cohn had two friends, Braddocks and myself. Braddocks was his literary friend. I was his tennis friend. The lady who had him, her name was Frances, found toward the end of the second year that her looks were going, and her attitude toward Robert changed from one of careless possession and exploitation to the absolute determination that he should marry her. During this time Robert's mother had settled an allowance on him, about three hundred dollars a month. During two years and a half I do not believe that Robert Cohn looked at another woman. He was fairly happy, except that, like many people living in Europe, he would rather have been in America, and he had discovered writing. He wrote a novel, and it was not really such a bad novel as the critics later called it, although it was a very poor novel. He read many books, played bridge, played tennis, and boxed at a local gymnasium. I first became aware of his lady's attitude toward him one night after the three of us had dined together. We had dined at l'Avenue's and afterward went to the Café de Versailles for coffee. We had several _fines_ after the coffee, and I said I must be going. Cohn had been talking about the two of us going off somewhere on a weekend trip. He wanted to get out of town and get in a good walk. I suggested we fly to Strasbourg and walk up to Saint Odile, or somewhere or other in Alsace. "I know a girl in Strasbourg who can show us the town," I said. Somebody kicked me under the table. I thought it was accidental and went on: "She's been there two years and knows everything there is to know about the town. She's a swell girl." I was kicked again under the table and, looking, saw Frances, Robert's lady, her chin lifting and her face hardening. "Hell," I said, "why go to Strasbourg? We could go up to Bruges, or to the Ardennes." Cohn looked relieved. I was not kicked again. I said good-night and went out. Cohn said he wanted to buy a paper and would walk to the corner with me. "For God's sake," he said, "why did you say that about that girl in Strasbourg for? Didn't you see Frances?" "No, why should I? If I know an American girl that lives in Strasbourg what the hell is it to Frances?" "It doesn't make any difference. Any girl. I couldn't go, that would be all." "Don't be silly." "You don't know Frances. Any girl at all. Didn't you see the way she looked?" "Oh, well," I said, "let's go to Senlis." "Don't get sore." "I'm not sore. Senlis is a good place and we can stay at the Grand Cerf and take a hike in the woods and come home." "Good, that will be fine." "Well, I'll see you to-morrow at the courts," I said. "Good-night, Jake," he said, and started back to the café. "You forgot to get your paper," I said. "That's so." He walked with me up to the kiosque at the corner. "You are not sore, are you, Jake?" He turned with the paper in his hand. "No, why should I be?" "See you at tennis," he said. I watched him walk back to the café holding his paper. I rather liked him and evidently she led him quite a life.`
	fmt.Println(wordCount(str))
}
